//
//  MyNightTableViewCell.m
//  LastOne
//
//  Created by 小柠檬 on 15/11/9.
//  Copyright © 2015年 sc. All rights reserved.
//

#import "MyNightTableViewCell.h"
#import "FitHeader.h"
#import "NightHeader.h"
@implementation MyNightTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20 * FitWidth, 10 * FitHeight, 200 * FitWidth, 30 * FitHeight)];
        [self.contentView addSubview:_label];
        
        _leftImageView = [[UIImageView alloc]initWithFrame:CGRectMake(20 * FitWidth, _label.frame.size.height + _label.frame.origin.y + 10 * FitHeight, 200 * FitWidth, 20 * FitHeight)];
        _leftImageView.backgroundColor = [UIColor redColor];
        [self.contentView  addSubview:_label];
        
        UIImageView *lineImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 60 * FitHeight, 375 * FitWidth, 7 * FitHeight)];
        lineImageView.backgroundColor = [UIColor colorWithRed:0.91 green:0.91 blue:0.91 alpha:1];
        [lineImageView NightWithType:UIViewColorType2];
        [self.contentView addSubview:lineImageView];
        
        self.rightSwitch = [[UISwitch alloc]initWithFrame:CGRectMake(_label.frame.origin.x + _label.frame.size.width + 80 * FitWidth, _label.frame.origin.y + 5 * FitHeight, 200 * FitWidth, 30 * FitHeight)];
        [self.contentView addSubview:_rightSwitch];
        
        
    }
    
    return self;
    
}










/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
